/* Copyright (C) 2013-2016, The Regents of The University of Michigan.
All rights reserved.

This software was developed in the APRIL Robotics Lab under the
direction of Edwin Olson, ebolson@umich.edu. This software may be
available under alternative licensing terms; contact the address above.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _ALIGNPOINTS3D_H
#define _ALIGNPOINTS3D_H

#include "zarray.h"

typedef struct alignpoints3d alignpoints3d_t;
struct alignpoints3d
{
    zarray_t *as; // double[3]
    zarray_t *bs; // double[3]
    zarray_t *ws;  // double
};

alignpoints3d_t *alignpoints3d_create();
void alignpoints3d_destroy(alignpoints3d_t *align);
void alignpoints3d_add(alignpoints3d_t *align, const double *a, const double *b);
void alignpoints3d_add_weighted(alignpoints3d_t *align, const double *a, const double *b, double weight);
void alignpoints3d_compute(alignpoints3d_t *align, double *mat44);
void alignpoints3d_reset(alignpoints3d_t *align);

#endif
